home *** CD-ROM | disk | FTP | other *** search
- Path: cs.utk.edu!not-for-mail
- From: charlton@cs.utk.edu (Ron Charlton)
- Newsgroups: comp.lang.c
- Subject: Re: Leap Years
- Date: 26 Feb 1996 10:48:06 -0500
- Organization: CS Department, University of Tennessee, Knoxville
- Message-ID: <4gsknmINN7ff@duncan.cs.utk.edu>
- References: <824158191snz@genesis.demon.co.uk> <fcusack-1302960025280001@mudskipper.cac.psu.edu> <4go5h2$sql@s02.pavilion.co.uk>
- NNTP-Posting-Host: duncan.cs.utk.edu
-
- In article <4go5h2$sql@s02.pavilion.co.uk> AJRobb@pavilion.co.uk (Andy J Robb) writes:
-
- |It is largely achademic, in the period 1901-2099 all years divisible
- |by 4 are leap years. Before that the Julian calender was still in
- |widespread use (e.g. Russia until 1917). In some parts of Britain
- |(and elsewhere) before 1752(?) the year ended on March 22(?).
- |
- |My point is that before radio-astronomy (mainly), global time-keeping
- |was a mess. Who can guarantee that the Gregorian calender will be in
- |use in 2100? Many operating systems (Unix) will have run out of
- |precision by then.
-
- This sort of thinking in the years 1960-1996 has put us in the position
- of spending *many* millions of dollars to recover from the two-digit year
- syndrome. A.D. 2000 is likely to be an exciting time for programmers
- as we try to discover all of the places "68" really represents "1968".
- All to save two bytes when storing the year. Many of the programmers who
- used two-year dates may be retired or dead now. *You* get to fix their
- "streamlined" code. (Yes, I know memory was once much more expensive,
- and saving two bytes might have been important, but I'd argue it has
- not been a valid justification since about 1980.)
-
- We are now making the same mistake when we "simplify" the leap year
- calculation. Why not just do it correctly now? If the rules change
- then at least future programmers won't be damning us for our laziness.
-
- A.D. 2100 is a long time away. A.D. 2000 was also a long time away in 1960.
-
- Ron
- --
- A just machine to make big decisions | Ron Charlton
- Programmed by fellows with compassion and vision | charlton@cs.utk.edu
- We'll be clean when their work is done ----------------------
- We'll be eternally free yes and eternally young -- Donald Fagen, I.G.Y.
-